<!doctype html>
<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
        <link rel="stylesheet" href="/node_modules/@perspective-dev/viewer/dist/css/pro.css" />
        <style>
            perspective-viewer {
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
            }

            perspective-viewer[theme="Pro Light"] {
                --plugin--background: #f2f4f6;
            }
        </style>
    </head>

    <body>
        <perspective-viewer> </perspective-viewer>
        <script type="module">
            import "/node_modules/@perspective-dev/viewer/dist/cdn/perspective-viewer.js";
            import "/node_modules/@perspective-dev/viewer-datagrid/dist/cdn/perspective-viewer-datagrid.js";
            import "/node_modules/@perspective-dev/viewer-d3fc/dist/cdn/perspective-viewer-d3fc.js";
            import perspective from "/node_modules/@perspective-dev/client/dist/cdn/perspective.js";
            const WORKER = await perspective.worker();
            async function on_load() {
                var el = document.getElementsByTagName("perspective-viewer")[0];
                const plugin = await el.getPlugin("Heatmap");
                plugin.render_warning = false;
                const table = WORKER.table(this.response);
                await el.load(table);
                await el.toggleConfig();
                window.__TEST_PERSPECTIVE_READY__ = true;
            }

            var xhr = new XMLHttpRequest();
            xhr.open("GET", "/node_modules/superstore-arrow/superstore.lz4.arrow", true);
            xhr.responseType = "arraybuffer";
            xhr.onload = on_load.bind(xhr);
            xhr.send(null);
        </script>
    </body>
</html>
